package com.zzf.concurrent.example.api;

import lombok.extern.slf4j.Slf4j;

/**
 * @author GaoFeng2017
 * @date 2019/8/5 8:54
 */

@Slf4j
public class StackSizeExample {

    private static int stackSize;

    public static void main(String[] args) {
        try {
            add(1);
        } catch (Error e) {
            e.printStackTrace();
            log.info("stackSize is {}", stackSize);
        }
    }

    private static void add(int num) {
        stackSize++;
        add(num + 1);
    }
}
